<template>
  <div @click="handlePreview">
    搜索
    <!-- <van-image-preview v-model="show" :images="images" @change="onChange">
  <template v-slot:index>第{{ index }}页</template>
</van-image-preview> -->
  </div>
</template>

<script>
import { ImagePreview } from 'vant'
export default {
  data() {
    return {
      show: false,
      index: 0,
      images: [
        "https://img01.yzcdn.cn/vant/apple-1.jpg",
        "https://img01.yzcdn.cn/vant/apple-2.jpg",
      ],
    };
  },
  methods: {
    onChange(index) {
      this.index = index;
    },
    handlePreview(){
      ImagePreview([
        'https://img01.yzcdn.cn/vant/apple-1.jpg',
        'https://img01.yzcdn.cn/vant/apple-2.jpg',
      ]);
    }
  },
};
</script>

<style lang="less" scoped>
</style>